﻿@{
    ViewBag.Title = "首页";
    Layout = null;
    var newsCount = 0;
    var IndexNews = Qcy.Jshj.Web.Helpers.DataHelper.GetArticles(1, 5, out newsCount);
    var productsCount = 0;
    var IndexProducts = Qcy.Jshj.Web.Helpers.DataHelper.GetIndexProducts(1, 3, out productsCount);
    var IndexLinks = Qcy.Jshj.Web.Helpers.DataHelper.GetFriendLinks();
}
<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title-佳饰家</title>
    <meta name="Keywords" content="" />
    <meta name="Description" content="" />
    <link href="~/Content/css/reset.css" rel="stylesheet" type="text/css" />
    <link href="~/Content/css/style.css" rel="stylesheet" type="text/css" />
    <script src="~/Scripts/jquery-1.8.2.min.js"></script>
    <link href="~/Scripts/fancybox/jquery.fancybox-1.3.4.css" rel="stylesheet" />
    <script src="~/Scripts/fancybox/jquery.fancybox-1.3.4.js"></script>
    <!--[if IE 6]>
        <script src="~/Scripts/fixpng.js"></script>
        <script type="text/javascript">
         DD_belatedPNG.fix('.por_bg');
        </script>
   <![endif]-->
    <script type="text/javascript">
        $(function () {
            var $li = $("#banner").find("li");
            var index = 0;
            function banner() {
                if (index > 1) {
                    index = 0;
                    $li.eq(index).fadeIn(2000);
                }
                else {
                    $li.eq(index - 1).fadeOut(2000);
                    $li.eq(index).fadeIn(2000);
                }
                index++;
            }
            setInterval(banner, 5000);


            $("a[rel=product]").fancybox({
                'transitionIn': 'none',
                'transitionOut': 'none',
                'titlePosition': 'over',
                'titleFormat': function (title, currentArray, currentIndex, currentOpts) {
                    return '<span id="fancybox-title-over">' + title + '</span>';
                }
            });
        })
    </script>
</head>
<body>
    <div class="top">
        <div class="center">
            <a class="logo" href="/">
                <img src="~/Content/images/logo.gif" alt="佳饰家" />
            </a>
            <div class="top_right">
                <div class="top_r_t">
                    @if (Qcy.Jshj.Web.Helpers.DataHelper.IsChinese)
                    {
                        <a href="/Home/Language?language=cn&returnUrl=@Request.Url.AbsoluteUri">
                            <img src="~/Content/images/top_menu_cn_select.gif" /></a>
                        <a href="/Home/Language?language=en&returnUrl=@Request.Url.AbsoluteUri">
                            <img src="~/Content/images/top_menu_en.gif" /></a>
                    }
                    else
                    {
                        <a href="/Home/Language?language=cn&returnUrl=@Request.Url.AbsoluteUri">
                            <img src="~/Content/images/top_menu_cn.gif" /></a>
                        <a href="/Home/Language?language=en&returnUrl=@Request.Url.AbsoluteUri">
                            <img src="~/Content/images/top_menu_en_select.gif" /></a>
                    }
                </div>
                <div class="clear"></div>
                <ul class="nav">
                    <li><a href="/Home">
                        <img src="~/Content/images/nav_01.gif" alt="网站首页" /></a></li>
                    <li><a href="/Home/About">
                        <img src="~/Content/images/nav_02.gif" alt="关于我们" /></a></li>
                    <li><a href="/Home/Products">
                        <img src="~/Content/images/nav_03.gif" alt="产品展示" /></a></li>
                    <li><a href="/Home/Quality">
                        <img src="~/Content/images/nav_04.gif" alt="质量控制" /></a></li>
                    <li><a href="/Home/Service">
                        <img src="~/Content/images/nav_05.gif" alt="服务支持" /></a></li>
                    <li><a href="/Home/OnLineOrder">
                        <img src="~/Content/images/nav_06.gif" alt="联系订购" /></a></li>
                </ul>
            </div>
        </div>
    </div>
    <div class="clear"></div>
    <div class="main">
        <div class="banner" id="banner">
            <ul>
                <li style="background: url(/Content/images/banner_01.jpg) no-repeat top center;"></li>
                <li style="background: url(/Content/images/banner_02.jpg) no-repeat top center;"></li>
            </ul>
        </div>
        <div class="content">
            <div class="com_news">
                <div class="com_news_nav">
                    <a class="com_news_more" href="#" target="_blank"></a>
                </div>
                <ul class="com_news_list">
                    @if (IndexNews != null)
                    {
                        foreach (var item in IndexNews)
                        {
                        <text>
                        <li><span>@item.CreationDate.ToString("yyyy-MM-dd")</span><img src="~/Content/images/com_news_ico.gif" alt="" /><a href="/Home/News/@item.Id" target="_blank">@item.Title</a></li>
                        </text>
                        }
                    }
                </ul>
            </div>
            <div class="products">
                <div class="pro_nav">
                    <a class="pro_more" href="/Home/Products"></a>
                </div>
                <ul class="products_list">
                    @if (IndexProducts != null)
                    {
                        foreach (var item in IndexProducts)
                        {
                        <text>
                        <li>
                            <a rel="product" href="@item.Image" title="@item.Title">
                                <img class="por_bg" src="~/Content/images/product_bg.png" alt="" /><img class="pro_pic" src="@item.Image" alt="" width="115" height="70" /></a>
                        </li>
                        </text>       
                        }
                    }
                </ul>
            </div>
            <div class="link_us">
                <a href="/Home/About">
                    <img src="~/Content/images/about_us.jpg" alt="关于我们" /></a>
                <img src="~/Content/images/contact_us.jpg" alt="联系我们" />
            </div>
            <div class="clear"></div>
            <div class="links">
                <strong>友情链接：</strong>
                @if (IndexLinks != null)
                {
                    foreach (var item in IndexLinks)
                    {
                    <a href="@item.Contents" target="_blank">@item.Title</a>        
                    }
                }
            </div>
        </div>
    </div>
    @Html.Partial("_FootPartial")
</body>
</html>
